package cn.edu.lingnan.lsqn.dao;

import org.springframework.stereotype.Repository;

import cn.cdahua.basic.dao.BaseDao;
import cn.cdahua.basic.model.Pager;
import cn.edu.lingnan.lsqn.model.Song;

@Repository("songDao")
public class SongDao extends BaseDao<Song> implements ISongDao {

	@Override
	public Pager<Song> find() {
		String hql = "from Song";
		return super.find(hql);
	}

	@Override
	public Pager<Song> findByUserId(int id) {
		String hql = "from Song s where s.user.id = ?";
		return super.find(hql,id);
	}

}
